package cn.zyl.common.redis.exception;

/** MiniRedisDataException 异常类说明: redis数据异常
 * @author wsz
 * @date 2020-08-11
 * @version v1.0
 */
public class MiniRedisDataException extends MiniRedisException {
    public MiniRedisDataException(String msg){ super(msg);}
    public MiniRedisDataException(Throwable e){ super(e);}
    public MiniRedisDataException(String msg,Throwable e){ super(msg,e);}
    public static void isTrueThrow(boolean boo,String msg) throws MiniRedisDataException{
        if(boo){throw new MiniRedisDataException(msg);}
    }
    public static void isTrueThrow(boolean boo,Throwable e) throws MiniRedisDataException{
        if(boo){throw new MiniRedisDataException(e);}
    }
    public static void isNullThrow(Object o,String msg) throws MiniRedisDataException{
        isTrueThrow(null == o,msg);
    }
}